const { defineConfig } = require("@vue/cli-service");
// const VueLoaderPlugin = require("vue-loader/lib/plugin");
const { ModuleFederationPlugin } = require("webpack").container;

module.exports = defineConfig({
  publicPath: "/",
  transpileDependencies: true,
  devServer: {
    port: 3000,
    headers: {
      "Access-Control-Allow-Origin": "*",
      "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
      "Access-Control-Allow-Headers":
        "X-Requested-With, content-type, Authorization",
    },
  },
  configureWebpack: {
    plugins: [
      new ModuleFederationPlugin({
        name: "test1",
        remotes: {
          federation: "federation@http://localhost:8080/remoteEntry.js",
        },
      }),
    ],
  },
});
